﻿@model ICollection<AfrikDotnetWebSite.Models.ExternalLogin>

@if (Model.Count > 0)
{
    <div class="box">
    <h3>Registered external logins</h3>
    <table>
        <tbody>
        @foreach (AfrikDotnetWebSite.Models.ExternalLogin externalLogin in Model)
        {
            <tr>
                <td>
                    @{ var css = externalLogin.ProviderDisplayName.ToLower();
                    if (css == "microsoft") { css = "windows"; } }
                    <span class="zocial @css">
                        @externalLogin.ProviderDisplayName
                    </span>
                </td>
                <td>
                    @if (ViewBag.ShowRemoveButton)
                    {
                        using (Html.BeginForm("Disassociate", "Account"))
                        {
                            @Html.AntiForgeryToken()
                            <div>
                                @Html.Hidden("provider", externalLogin.Provider)
                                @Html.Hidden("providerUserId", externalLogin.ProviderUserId)
                                 <input type="submit" value="Remove" title="Remove this @externalLogin.ProviderDisplayName credential from your account" />
                            </div>
                        }
                    }
                    else
                    {
                        @: &nbsp;
                    }
                </td>
            </tr>
        }
        </tbody>
    </table>
        </div>
}
